home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 1 / PC Actual CD 01.iso / share / dos / progr / svga2.arj / NOTES_S3.SVG < prev    next >
Encoding:
Text File  |  1993-06-11  |  3.0 KB  |  81 lines

  1. SuperVGA S3 BGI driver 
  2. Version 1.1
  3. May 20, 1993
  4.  
  5. Revisions:
  6.     1.05 - January 28, 1993
  7.     1.0 - June 28, 1992
  8.  
  9. This is the latest version of my SuperVGA S3 BGI driver.  All functions
  10. have been implemented, but there may still be bugs.
  11.  
  12.     o Apparently there is a problem with using putimage at addresses >64k
  13.     (The driver will put up a solid block instead of the image)
  14.  
  15. Note:  Palette functions, and the mouse cursor will not work with this driver.
  16.        Paging is not yet implemented
  17.  
  18.   Using the driver in the 256 and 16 color modes is similar to using the
  19.   standard SuperVGA 256 and 16 color drivers.  See the files NOTES[256|16].SVG
  20.  
  21.   Using the S3 driver in 32768 color mode:
  22.  
  23.     Implementing the 32768 color driver involved several hacks, as
  24.     the BGI interface only supports 8-bit color values, but the driver
  25.     needed support for 15-bit color values.  The procedures that needed
  26.     to be changed were those that accepted color values, (SetColor,
  27.     SetFillStyle, SetFillPattern, PutPixel and Floodfill)  and those 
  28.     that return color values (GetColor and GetPixel).
  29.     As the HiColor modes do not support palettes, I decided to use
  30.     the SetRgbPalette call to set colors, as it accepts values for the 
  31.     R,G and B components of the color.
  32.  
  33.     The format of a pixel in the HiColor modes is:
  34.         -Byte 1- -Byte 0-
  35.         xRRRRRGG GGGBBBBB
  36.  
  37.     Several new functions are defined to make the color selection easier.
  38.     In addition, the macro RGB(rv,gv,bv) has been defined.  It packs
  39.     the R, G and B values into the format described above and returns the
  40.     combined color.
  41.  
  42.     * RealDrawColor(); - Sets the current drawing color.
  43.       Usage:
  44.         setcolor(RealDrawColor(RGB(rval,gval,bval)); - HiColor modes
  45.         setcolor(RealDrawColor(cval)); - (suggested for any other driver)
  46.  
  47.     * RealFillColor(); - Sets the current fill color.
  48.       Usage:
  49.         setfillstyle(fillstyle,RealFillColor(RGB(rval,gval,bval)));
  50.         setfillstyle(fillstyle,RealFillColor(cval));
  51.         setfillpattern(fillpat,RealFillColor(RGB(rval,gval,bval)));
  52.         setfillpattern(fillpat,RealFillColor(cval));
  53.  
  54.     * RealColor(); - For putpixel, sets the color of the pixel
  55.                - For floodfill, sets the color of the boundary
  56.         putpixel(x,y,RealColor(RGB(rval,gval,bval)));
  57.         putpixel(x,y,RealColor(cval));
  58.         floodfill(x,y,RealColor(RGB(rval,gval,bval)));
  59.         floodfill(x,y,RealColor(cval));
  60.  
  61.     * GetPixel normally only returns an 8-bit value.  However, the
  62.       value returned from the BGI driver is a 16-bit value in DX (the 
  63.       BGI kernel loads the value into AX and clears the upper 8 bits),
  64.       so to read the value of a pixel:
  65.  
  66.       In Pascal:
  67.         Color := getpixel(x,y);
  68.         inline($89/$56/<Color);  (* Loads 15-bit color value *)
  69.  
  70.       In C:
  71.         Color = getpixel(x,y);
  72.         Color = _DX;
  73.       
  74.     o Mouse code hooks added (1.05)
  75.  
  76.     o Fixed text clipping at right and bottom edges (1.1)
  77.  
  78.     o Added compile-time support for 8x8, 8x14, or 8x16 bitmap fonts (1.1)
  79.  
  80.     o Fixed detection so it should work with newer S3 cards (1.1)
  81.